<!DOCTYPE html>
<html>
<head>
<title>用户登录 - {$site_name}</title>
<meta name="keywords" content="{$site_seo_keywords}" />
<meta name="description" content="{$site_seo_description}">
<tc_include file="Public:head" />
<style>
.qrcode img{ width:240px; height:240px; border:1px solid #d0d0d0;}
</style>
</head>

<body class="page">
	<tc_include file="Public:nav" />
	<div class="container">
		<span class="qrcode">
			<img id="loginQrCode" src="/user/qrcode">
		</span>
	</div>
	<tc_include file="Public:footer" />	
	<tc_include file="Public:scripts" />
	<script>
	var curr_request;
	function checkLogin(){
		var url = '/user/qrcode/check/';
		curr_request = $.get(url,function(msg){
			if (msg.status == -1) {
				$("#loginQrCode").attr("src", "/user/qrcode?t=" + new Date().getTime());
				checkLogin();
			} else if (msg.status == 0) {
				checkLogin();
			}
			else if(msg.status == 1)
			{
				EMI.alertDialog(msg.info);
				//location.href = "/";
			}			
		})
	}
setInterval("checkLogin()",3000);
window.onbeforeunload = function abort_request() {
	if (curr_request != null) {
		curr_request.abort();
	}
};
	</script>
</body>
</html>